from api import API
from pytickee import errors
import logging

logging.basicConfig(level=logging.ERROR)

used_api = API()

def set_host(host):
    global used_api
    used_api = API(host=host)
    
def get_api():
    if not used_api:
        raise errors.TickeeError("No API set!")
    return used_api